package hang.study.uistudy;

import android.app.LauncherActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ArrayAdapter;

/**
 * Created by Administrator on 2015/10/28.
 */
public class TestLauncherActivity extends LauncherActivity {

    String[] names = {"设置程勋参数","查看星际兵种","Result Activity"};
    Class<?>[] classes = {TestDownloadActivity.class,TestImgActivity.class,TestForResultActivity.class};

    @Override
    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(
                this,android.R.layout.simple_list_item_1,names
        );
        setListAdapter(adapter);
    }

    @Override
    public Intent intentForPosition(int position){
        return new Intent(TestLauncherActivity.this,classes[position]);
    }

}
